﻿using BookStores.DTO.Response;
using Dapper.Database;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BookStores.IDomain
{
    /// <summary>
    /// 
    /// </summary>
    public interface IBookAuthors : Shared.Contracts.IDependency
    {
        /// <summary>
        /// 获取作者列表
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Task<(IEnumerable<BookAuthor>, int)> GetBookAuthors(string name, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 保存作者
        /// </summary>
        /// <param name="bookAuthors"></param>
        /// <returns></returns>
        Task<bool> Insert(Entity.BookAuthors bookAuthors);
        Task<bool> Update(Entity.BookAuthors bookAuthors);

        Task<bool> Delete(string id);
    }
}
